﻿
using Student.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Student
{
    public partial class FormManager : Form
    {
   
        public FormManager()
        {
            InitializeComponent();

            //把本地存储的数据 取出来进行展示
            List<Student1> l1 = null;
            try
            {
                l1 = Student.Tools.SaveData.QuData("Students.txt") as List<Student1>; //取出本地数据
            }
            catch
            {
                l1 = new List<Student1>();
            }

            this.dataGridView2.AutoGenerateColumns = false; // 禁止自动生成列表题
            this.dataGridView2.DataSource = l1;    
        
        }

        private void button7_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
    
}
